package com.cjkj.system.api.domain;

import com.cjkj.common.core.constant.RegConstants;
import com.cjkj.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 医院用户对象 t_hospital_user
 *
 * @author cjkj
 * @date 2024-08-30
 */
public class THospitalUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private String userId;

    /** 医院ID */
    private String hospitalId;

    /** 科室ID */
    @NotBlank(message = "科室ID不能为空！")
    private String deptId;

    /** 姓名 */
    @NotBlank(message = "姓名不能为空！")
    private String fullName;

    /** 用户角色（00=医院账号，01=医生账号） */
    private String userType;

    /** 用户邮箱 */
    private String email;

    /** 手机号码 */
    private String phonenumber;

    /** 用户账号 */
    @NotBlank(message = "账号不能为空！")
    private String userName;

    /** 密码 */
    @NotBlank(message = "密码不能为空！")
    @Pattern(regexp = RegConstants.PASSWORD, message = "密码格式不正确！")
    private String password;

    /** 账号状态（0=正常，1=停用） */
    private String status;

    /** 删除标志（0=存在，2=删除） */
    private String delFlag;

    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getUserId()
    {
        return userId;
    }
    public void setHospitalId(String hospitalId)
    {
        this.hospitalId = hospitalId;
    }

    public String getHospitalId()
    {
        return hospitalId;
    }
    public void setDeptId(String deptId)
    {
        this.deptId = deptId;
    }

    public String getDeptId()
    {
        return deptId;
    }
    public void setFullName(String fullName)
    {
        this.fullName = fullName;
    }

    public String getFullName()
    {
        return fullName;
    }
    public void setUserType(String userType)
    {
        this.userType = userType;
    }

    public String getUserType()
    {
        return userType;
    }
    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getEmail()
    {
        return email;
    }
    public void setPhonenumber(String phonenumber)
    {
        this.phonenumber = phonenumber;
    }

    public String getPhonenumber()
    {
        return phonenumber;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setPassword(String password)
    {
        this.password = password;
    }

    public String getPassword()
    {
        return password;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setDelFlag(String delFlag)
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag()
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("userId", getUserId())
                .append("hospitalId", getHospitalId())
                .append("deptId", getDeptId())
                .append("fullName", getFullName())
                .append("userType", getUserType())
                .append("email", getEmail())
                .append("phonenumber", getPhonenumber())
                .append("userName", getUserName())
                .append("password", getPassword())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .toString();
    }
}
